This is the code to reproduce Figure 1 The landscape of T cell populations in r/r B-ALL patients treated with varni-cel.: Fig1D-J. To obtain the data object used in this notebook, please run 01_TCR_Data_Analysis.Rmd.
library(Seurat)
library(UCell)
library(ggplot2)
col_feature <- c("#C51B7D", "khaki1")
col_clono <- c("Hyperexpanded (100 < X <= 500)"="#810F7C", "Large (20 < X <= 100)"="#8856A7","Medium (5 < X <= 20)"= "#8C96C6","Small (1 < X <= 5)"= "#9EBCDA", "Single (0 < X <= 1)"="#BFD3E6", "No clonotype detected"="gray69")
cols_patient =c("Patient 1"= "aquamarine", "Patient 2"="lightpink", "Patient 3"="yellow1", "Patient 4"="skyblue", "Patient 5"="sienna1")
cols_patient2 <- c("aquamarine", "#6FDFBA", "lightpink", "#DF9FA9", "yellow1", "#DFDC00", "skyblue", "#76B4CF","sienna1", "#DF733E")
cols_timepoint<- c("IP"="#4E6AAB","Peak"="#e78ac3")
cols_anno <- c("CD4+ Naive T cells"= "#33A02C",
"CD4+ CEntral/Effector memory T cells (CM/EM)"="#B2DF8A",
"CD8+ cytotoxic T cells"="#185B88",
"CD8+ Effector T cells (E)"="#1F78B4",
"CD8+ Eff/Mem T cells (EM)"="#A6CEE3",
"Early prolif: MCM3/5/7+ PCNA+ T cells"="#FB9A99",
"Late prolif: histones enriched MKI67+ T cells"="#E31A1C",
"Late prolif: CCNB1/2+ CDK1+ T cells"="#CAB2D6",
"Late prolif: STMN1+ BIRC5+"="#FDBF6F",
"Ribosomal/Mitochondrial/Degraded cells"="#FF7F00",
"gamma-delta T cells"="#6A3D9A")
cols_CAR<- c("CAR+"="#66C2A5" ,"CAR-"="#FC8D62")
data <- readRDS("../MENENDEZ_DEF.rds")
signature <- list()
signature[["cycling"]] <- c("TOP2A", "MKI67", "STMN1")
signature[["effector.cytotoxic"]] <- c("CD8A", "CD8B","GZMA", "GZMK", "CCL5", "CXCR3","KLRG1", "CXCR3", "CXCR4", "PRF1")
data <- AddModuleScore_UCell(data, features = signature, ncores = 4)
DimPlot(data, group.by = "Class1", cols=cols_CAR)
DimPlot(data, group.by = "Timepoint", cols=cols_timepoint)
FeaturePlot(data, features = "cycling_UCell", pt.size = 0.1, cols= col_feature) + ggtitle("Cycling score")
FeaturePlot(data, features = "effector.cytotoxic_UCell", pt.size = 0.1, cols= col_feature, order=T) + ggtitle("Effector/Cytotoxic score")
DimPlot(data, group.by = "cloneType", cols=col_clono, order = c("Hyperexpanded (100 < X <= 500)", "Large (20 < X <= 100)", "Medium (5 < X <= 20)", "Small (1 < X <= 5)", "Single (0 < X <= 1)", "No clonotype detected"))
p1 <- DimPlot(data, group.by = "annotation", cols=cols_anno) + NoLegend() + ggtitle("") +
theme(axis.line=element_blank(),
axis.ticks=element_blank(),
axis.text.x=element_blank(),
axis.text.y=element_blank(),
axis.title.x=element_blank(),
axis.title.y=element_blank())
p2<- DimPlot(data, group.by = "annotation", cols=cols_anno, split.by = "Patient_id") + NoLegend() + ggtitle("") +
theme(axis.line=element_blank(),
axis.ticks=element_blank(),
axis.text.x=element_blank(),
axis.text.y=element_blank(),
axis.title.x=element_blank(),
axis.title.y=element_blank())
p1+p2
finals_genes <- c("CD27", "GZMK", "CD8B",
"GZMK", "PASK", "TCF7",
"GZMH", "GZMB", "NKG7", "GNLY", "PRF1",
"CD40LG", "CD4", "TIMP1",
"IL7R", "TXNIP", "FXYD5",
"TRDV1", "TYROBP", "TRGV8",
"CCNB1", "CCNB2", "CDK1",
"MCM5", "MCM7", "PCNA",
"HIST1H1B", "MKI67", "AURKA",
"STMN1", "BIRC5", "HMGB2",
"RPS2", "MT-CO2", "MT-CO3")
data$annotation <- factor(data$annotation,
levels =
c("CD8+ Eff/Mem T cells (EM)", "CD8+ Effector T cells (E)", "CD8+ cytotoxic T cells", "CD4+ CEntral/Effector memory T cells (CM/EM)", "CD4+ Naive T cells", "gamma-delta T cells", "Late prolif: CCNB1/2+ CDK1+ T cells", "Early prolif: MCM3/5/7+ PCNA+ T cells", "Late prolif: histones enriched MKI67+ T cells", "Late prolif: STMN1+ BIRC5+", "Ribosomal/Mitochondrial/Degraded cells"))
Idents(data) <- data$annotation
DotPlot(object = data, features = unique(finals_genes), dot.scale = 8) + scale_colour_gradient2(low = "navyblue", mid = "khaki1", high = "red3") + theme(axis.text.x = element_text(angle =45, hjust=1))+
theme(axis.title.y=element_blank(),
axis.title.x=element_blank(),
axis.text.y = element_text(size = 5),
axis.text.x = element_text(size = 5))
sessionInfo()
## R version 4.2.0 (2022-04-22)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur/Monterey 10.16
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] ggplot2_3.5.1 UCell_2.2.0 Seurat_5.0.1 SeuratObject_5.0.1 sp_2.1-2
##
## loaded via a namespace (and not attached):
## [1] spam_2.10-0 plyr_1.8.9 igraph_1.5.1 lazyeval_0.2.2 splines_4.2.0 RcppHNSW_0.5.0 BiocParallel_1.32.6 listenv_0.9.1 scattermore_1.2 GenomeInfoDb_1.34.9 digest_0.6.33 htmltools_0.5.7 fansi_1.0.6 magrittr_2.0.3 tensor_1.5 cluster_2.1.6 ROCR_1.0-11 globals_0.16.3 matrixStats_1.2.0 spatstat.sparse_3.0-3 colorspace_2.1-0 ggrepel_0.9.4 xfun_0.41 dplyr_1.1.4 RCurl_1.98-1.13 jsonlite_1.8.8 progressr_0.14.0 spatstat.data_3.0-4 survival_3.5-7 zoo_1.8-12 glue_1.6.2 polyclip_1.10-6 gtable_0.3.5 zlibbioc_1.44.0 XVector_0.38.0 leiden_0.4.3.1 DelayedArray_0.24.0 future.apply_1.11.2 SingleCellExperiment_1.20.1 BiocGenerics_0.44.0 abind_1.4-5 scales_1.3.0
## [43] spatstat.random_3.2-2 miniUI_0.1.1.1 Rcpp_1.0.11 viridisLite_0.4.2 xtable_1.8-4 reticulate_1.34.0 dotCall64_1.1-1 stats4_4.2.0 htmlwidgets_1.6.4 httr_1.4.7 RColorBrewer_1.1-3 ica_1.0-3 farver_2.1.1 pkgconfig_2.0.3 sass_0.4.8 uwot_0.1.16 deldir_2.0-2 utf8_1.2.4 labeling_0.4.3 tidyselect_1.2.1 rlang_1.1.2 reshape2_1.4.4 later_1.3.2 munsell_0.5.1 tools_4.2.0 cachem_1.0.8 cli_3.6.2 generics_0.1.3 ggridges_0.5.6 evaluate_0.23 stringr_1.5.1 fastmap_1.1.1 yaml_2.3.8 goftest_1.2-3 knitr_1.41 fitdistrplus_1.1-11 purrr_1.0.2 RANN_2.6.1 pbapply_1.7-2 future_1.33.2 nlme_3.1-164 mime_0.12
## [85] compiler_4.2.0 rstudioapi_0.16.0 plotly_4.10.4 png_0.1-8 spatstat.utils_3.0-4 tibble_3.2.1 bslib_0.4.1 stringi_1.8.3 highr_0.10 RSpectra_0.16-1 lattice_0.22-5 Matrix_1.6-5 vctrs_0.6.5 pillar_1.9.0 lifecycle_1.0.4 spatstat.geom_3.2-7 lmtest_0.9-40 jquerylib_0.1.4 RcppAnnoy_0.0.21 BiocNeighbors_1.16.0 data.table_1.15.4 cowplot_1.1.3 bitops_1.0-7 irlba_2.3.5.1 httpuv_1.6.13 patchwork_1.2.0.9000 GenomicRanges_1.50.2 R6_2.5.1 promises_1.2.1 KernSmooth_2.23-22 gridExtra_2.3 IRanges_2.32.0 parallelly_1.36.0 codetools_0.2-20 fastDummies_1.7.3 MASS_7.3-57 SummarizedExperiment_1.28.0 withr_3.0.0 sctransform_0.4.1 S4Vectors_0.36.2 GenomeInfoDbData_1.2.9 parallel_4.2.0
## [127] grid_4.2.0 tidyr_1.3.0 rmarkdown_2.18 MatrixGenerics_1.10.0 Rtsne_0.17 spatstat.explore_3.2-5 Biobase_2.58.0 shiny_1.8.1.1